Collapsible menu not working correct in internet explore 8
I have writen(as you can see i am not a jQuery expert :P ) a small piece of code for a ul/li collapsible menu, all browsers do what i want but IE8 is not working propper.
  
   -     jQuery("a.cat_w_sub").toggle(function(){
                                          
        if (jQuery(this).next("ul").is(":hidden")) {                                  
            jQuery(this).next("ul").slideDown(100);
            jQuery(this).addClass("cat_open");
        }else{
            jQuery(this).next("ul").slideUp(100);
            jQuery(this).removeClass("cat_open");    
        }
        
    }, function(){
        
        if (jQuery(this).next("ul").is(":hidden")) {                                  
            jQuery(this).next("ul").slideDown(100);
            jQuery(this).addClass("cat_open");
        }else{
            jQuery(this).next("ul").slideUp(100);
            jQuery(this).removeClass("cat_open");    
        }
        
    });
 
  
I have used the jQuery ui accordion first but this wasn't work that well, so i switch to this piece of code
The bug/error: well if i click on the menu(which is closet at first) it doesn't open at first but once i click on it, it opens and closes.
Any idea's?
Sorry but i dont have an demo online.